<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Module: backupService</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Module: backupService</h1>

    




<section>

<header>
    
        
            
        
    
</header>

<article>
    <div class="container-overview">
    
        
            <div class="description"><p>Backup Service module</p></div>
        

        
            















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="backup.service.js.html">backup.service.js</a>, <a href="backup.service.js.html#line1">line 1</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
    
    </div>

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="~cleanupTempFiles"><span class="type-signature">(inner) </span>cleanupTempFiles<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Deletes all temporary files used in the back up process. All files are located in the /backups/temp/ directory.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="backup.service.js.html">backup.service.js</a>, <a href="backup.service.js.html#line77">line 77</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="~exportContentToJsonFiles"><span class="type-signature">(inner) </span>exportContentToJsonFiles<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Gets all content records and exports each content record to a separate json file.
Gets all user records and exports each content record to a separate json file.
Zips all content and user json files into a single backup file in this format: <code>${new Date().toJSON()}-sonicjs-backup.zip</code></p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="backup.service.js.html">backup.service.js</a>, <a href="backup.service.js.html#line31">line 31</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="~startup"><span class="type-signature">(inner) </span>startup<span class="signature">(express)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Sets the backup URL that will trigger a backup. This url can be found in the .env file.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>express</code></td>
            

            <td class="type">
            
                
<span class="param-type">app</span>


            
            </td>

            

            

            <td class="description last"><p>app</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="backup.service.js.html">backup.service.js</a>, <a href="backup.service.js.html#line16">line 16</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="~uploadToDropBox"><span class="type-signature">(inner) </span>uploadToDropBox<span class="signature">(sourceFilePath, destinationFileName)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Optionally uploads backup files to Dropbox.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sourceFilePath</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>full path of the source file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>destinationFileName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>full path of the destination file.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="backup.service.js.html">backup.service.js</a>, <a href="backup.service.js.html#line122">line 122</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-backupService.html">backupService</a></li><li><a href="module-dalService.html">dalService</a></li><li><a href="module-dataService.html">dataService</a></li><li><a href="module-typeDefs.html">typeDefs</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Apr 08 2022 15:23:14 GMT-0700 (Pacific Daylight Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>